#ifndef COMTRADEDATA_H
#define COMTRADEDATA_H

#include <QObject>
#include <QByteArray>
#include <QList>

class ComtradeData : public QObject
{
    Q_OBJECT
public:
    explicit ComtradeData(QObject *parent = nullptr);
    ~ComtradeData();
signals:

public:

    int m_n;
    int m_timestamp;
    QList<int> m_AI;
    QList<int> m_DI;

    void parse_dat(QByteArray data, int ai_count=0, int di_count=0);

    int32_t fbyte_to_int(QByteArray bytes);
    int16_t tbyte_to_int(QByteArray bytes);

};

#endif // COMTRADEDATA_H
